import * as types from '../constants/actionTypes';
import initialState from '../../reducers/initialState';

export default function(state=initialState.card, action)
{
    switch(action.type){
        case types.CARDNAME_CHANGE:
            return Object.assign({},state,{bank_name: action.bank_name});
        case types.CARDPROVINCE_CHANGE:
            return Object.assign({},state,{card_province: action.card_province});
        case types.CARDCITY_CHANGE:
            return Object.assign({},state,{card_city: action.card_city});
        default:
            return state;
    }
}
